#!/usr/bin/env python3
# -*- coding:utf-8 -*-
from peewee import MySQLDatabase

"""
Created By TOBI
Date at 2021/5/22 11:15
Description: 数据库工具类，进行数据库的连接等功能
"""


def get_mysql_connect():
    """获取Mysql数据库连接"""
    db = MySQLDatabase('finance_db', host='49.235.110.16', user='root', passwd='root', port=3306)
    return db


def close_db(db):
    """关闭数据库实例"""
    db.close()
